import cv2 as cv
import numpy as np

img = cv.imread('../resources/miku.jpg')

img2 = np.zeros(img.shape, np.uint8)
img2[:,:] = (127, 127, 127)

dst1 = cv.bitwise_and(img, img2)
dst2 = cv.bitwise_or(img, img2)
dst3 = cv.bitwise_xor(img, img2)

cv.imshow('dst1', dst1)
cv.imshow('dst2', dst2)
cv.imshow('dst3', dst3)
cv.waitKey(0)
cv.destroyAllWindows()